<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>ldiv</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>ldiv</b> -  polynomial matrix long division</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>[x]=ldiv(n,d,k)   </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>n,d</b>
        </tt>: two real polynomial matrices</li>
      <li>
        <tt>
          <b>k</b>
        </tt>: integer</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>x=ldiv(n,d,k)</b>
      </tt> gives the <tt>
        <b>k</b>
      </tt> first coefficients  of the long
    division of <tt>
        <b>n</b>
      </tt> by <tt>
        <b>d</b>
      </tt> i.e.  the Taylor expansion of the rational
    matrix <tt>
        <b>[nij(z)/dij(z)]</b>
      </tt> near infinity.</p>
    <p>
    Coefficients of expansion of <tt>
        <b>nij/dij</b>
      </tt> are stored in  
    <tt>
        <b>x((i-1)*n+k,j)  k=1:n</b>
      </tt>
    </p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

wss=ssrand(1,1,3);[a,b,c,d]=abcd(wss);
wtf=ss2tf(wss);
x1=ldiv(numer(wtf),denom(wtf),5)
x2=[c*b;c*a*b;c*a^2*b;c*a^3*b;c*a^4*b]
wssbis=markp2ss(x1',5,1,1);
wtfbis=clean(ss2tf(wssbis))
x3=ldiv(numer(wtfbis),denom(wtfbis),5)
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="../control/arl2.htm">
        <tt>
          <b>arl2</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="../control/markp2ss.htm">
        <tt>
          <b>markp2ss</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="pdiv.htm">
        <tt>
          <b>pdiv</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
  </body>
</html>
